<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">

    <title>后台</title>

    <link href="__PUBLIC__/images/favicon.ico" rel="shortcut icon" />

    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap.min.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap-theme.min.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/dashboard.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap-switch.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/icheck/all.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap-datetimepicker.css" />
    <style>
        .datetimepicker.quarter .month {
            width: 48%;
        }
        .datetimepicker.quarter .month:nth-child(n+5){
            display: none;
        }
    </style>

</head>

<body>

<include file="Common/topNav" />

<div class="container-fluid">
    <div class="row">
        <include file="Common/leftMenu" />
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <!--标题头-->
            <div class="cont-title clearfix">
                <div class="title">税收统计</div>
                <div class="btn-group">

                </div>
            </div>
            <!--搜索模块-->
            <form class="jc-search form-inline searchForm" method="post" action="{:U('Admin/Tax/taxStatistics')}" id="searchForm">
                <div class="form-group">
                    <label>纳税年份:</label>
                    <select class="form-control" name="year">
                        <volist name="yearOption" id="item">
                            <option value="{$item}" <if condition="$year eq $item">selected</if>>{$item}年</option>
                        </volist>
                    </select>
                </div>
                <div class="form-group">
                    <label>纳税季度:</label>
                    <select class="form-control" name="season" id="season">
                        <option value="">--请选择--</option>
                        <option value="一季度" <if condition="$season eq '一季度'">selected</if>>一季度</option>
                        <option value="二季度" <if condition="$season eq '二季度'">selected</if>>二季度</option>
                        <option value="三季度" <if condition="$season eq '三季度'">selected</if>>三季度</option>
                        <option value="四季度" <if condition="$season eq '四季度'">selected</if>>四季度</option>
                    </select>
                </div>
                <!--<div class="form-group">-->
                <!--<label>所属商圈:</label>-->
                <!--<select class="form-control" name="trade_id">-->
                <!--<option value="" <if condition="$trade_id eq ''">selected</if>>全部</option>-->
                <!--<foreach name="tradeList" item="trade">-->
                <!--<option value="{$trade.id}" <if condition="$trade.id eq $trade_id">selected</if>>{$trade.name}</option>-->
                <!--</foreach>-->
                <!--</select>-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label>街道 :</label>-->
                    <!--<select class="form-control" name="org_id" >-->
                        <!--<volist name="orgs" id="item">-->
                            <!--<option  value="{$item.id}" <if condition="$orgId eq $item['id']">selected="selected"</if> >{$item.name} </option>-->
                        <!--</volist>-->
                    <!--</select>-->
                <!--</div>-->
                <div class="form-group">
                    <label>楼宇 :</label>
                    <select class="form-control" name="house_id">
                        <option value="" >全部</option>
                        <volist name="houses" id="item">
                            <option <if condition="$houseId eq $item['id']">selected="selected"</if> value="{$item.id}">{$item.name}</option>
                        </volist>
                    </select>
                </div>
                <button type="button" id="search" class="btn">搜索</button>
            </form>
            <!--表格-->
            <div class="table-responsive">
                <table class="table table-striped table-hover" id="tableData">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>楼宇名称</th>
                        <th>营业额（万元）</th>
                        <th>纳税额（万元）</th>
                        <th>纳税日期</th>
                        <th>所属街道</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="taxList['list']" id="tax">
                        <tr>
                            <td>{$key|getLineNum=$nowPage,$pageSize}</td>
                            <td> {$tax.house_name}</td>
                            <td>{$tax.turnover|number_format=2}</td>
                            <td>{$tax.tax_amount|number_format=2}</td>
                            <td>{$tax.tax_date}</td>
                            <td>{$tax.org_name}</td>
                            <td>
                                <a href="{:U('Admin/Tax/index',array('house_id'=>$tax['id'],'year'=>$year,'season'=>$season))}">明细</a> |
                                <a href="{:U('Admin/Tax/exception',array('house_id'=>$tax['id'],'year'=>$year,'season'=>$season))}">异常</a>
                            </td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
                <div class="page">
                    {$taxList.page}
                </div>
            </div>

        </div>
    </div>
</div>
<include file="Common/modalHtmls" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-switch.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/icheck.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/validator.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/vendor/jquery.ui.widget.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/jquery.fileupload.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/jquery.fileupload-ui.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/jquery.fileupload-process.js"></script>
<script>



    $("#tableData .delTax").click(function(){
        var id = $(this).attr("companyId");
        common.confirm("提示","确定删除该税收记录?",function(){
            common.ajax("{:U('Admin/Tax/delTax')}",{taxId:id},function(data){
                common.alert("提示","该税收记录删除成功!",function(){
                    common.reload();
                });
            })
        })
    });
    $("#tableData .detailCompany").click(function () {
        var companyId = $(this).attr("companyId");
        common.htmlAjax("{:U('Admin/Company/info')}", {companyId: companyId}, function (html) {
            $("#commonModal").html(html).modal({show: true, backdrop: 'static', keyboard: false});
        })
    })
    $("#search").click(function () {
        $('#searchForm').submit();
    })
</script>
</body>
</html>
